package com.common.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;


/**
 * @author ficus
 * 执行sql接口
 */
interface SqlDao {
	
	@Select(" ${sql} ")
	public Integer selectInt(@Param("sql") String sql);

	@Select(" ${sql} ")
	public String selectString(@Param("sql") String sql);
	
	@Select(" ${sql} ")
	public Map<String,Object> selectObject(@Param("sql") String sql);
	
	@Select(" ${sql} ")
	public <T> T selectTypeObject(@Param("sql") String sql);
	
	@Select(" ${sql} ")
	public <T> List<T>  selectTypeList(@Param("sql") String sql);
	
	@Select(" ${sql} ")
	public List<Map<String, Object>> selectObjectList(@Param("sql") String sql);	
	
	@Select(" ${sql} ")
	public void execute(@Param("sql") String sql);
	
}
